import { Controller, Get, Query } from '@nestjs/common';
import { SearchService } from './search.service';

/**
 * 搜索控制器
 */
@Controller('search')
export class SearchController {
  constructor(private readonly searchService: SearchService) {}

  /**
   * 全局搜索
   */
  @Get()
  search(@Query('q') keyword: string) {
    return this.searchService.search(keyword);
  }
}





